package org.pisces.wechat.po;

import java.io.Serializable;

import javax.persistence.Id;
import javax.persistence.Table;

import org.pisces.wechat.enums.EEventType;
import org.pisces.wechat.enums.EMsgType;

import com.thoughtworks.xstream.annotations.XStreamAlias;
/** 
 * POST的XML数据包转换为消息接受对象 
 *  
 * <p> 
 * 由于POST的是XML数据包，所以不确定为哪种接受消息，<br/> 
 * 所以直接将所有字段都进行转换，最后根据<tt>MsgType</tt>字段来判断取何种数据 
 * </p> 
 *  
 */  
@XStreamAlias("xml")
@Table(name ="t_input_message")
public class InputMessage implements Serializable {  
  
    /**
	 * 
	 */
	private static final long serialVersionUID = -6521787183795174876L;

	@XStreamAlias("MsgId")
	@Id
	private Long id;
	/** 
     *  
     */  
    @XStreamAlias("ToUserName")  
    private String toUserName;  
    
    @XStreamAlias("FromUserName")  
    private String fromUserName;  
    
    @XStreamAlias("CreateTime")  
    private Long createTime;  
    
    @XStreamAlias("MsgType")  
    private EMsgType msgType;  
    
    // 文本消息  
    @XStreamAlias("Content")  
    private String content;  
    // 图片消息  
    @XStreamAlias("PicUrl")  
    private String picUrl;  
    
    // 自动获取位置消息  
    @XStreamAlias("Latitude")  
    private String latitude;  
    
    @XStreamAlias("Longitude")  
    private String longitude;  
    
    //发送的位置信息
    @XStreamAlias("Location_X") 
    private String locationX;
    
    @XStreamAlias("Location_Y")
    private String locationY;
    
    //地图缩放大小
    @XStreamAlias("Scale")  
    private Long scale;  
    
    @XStreamAlias("Label")  
    private String label;  
    // 链接消息  
    @XStreamAlias("Title")  
    private String title;  
    
    @XStreamAlias("Description")  
    private String description;  
    
    @XStreamAlias("Url")  
    private String url;  
    // 语音信息  
    @XStreamAlias("MediaId")  
    private String mediaId;  
    
    @XStreamAlias("Format")  
    private String format;  
    
    @XStreamAlias("Recognition")  
    private String recognition;  
    // 事件  
    @XStreamAlias("Event")  
    private EEventType event;
    
    @XStreamAlias("EventKey")  
    private String eventKey;  
    
    @XStreamAlias("Ticket")  
    private String ticket;

	public String getToUserName() {
		return toUserName;
	}

	public void setToUserName(String toUserName) {
		this.toUserName = toUserName;
	}

	public String getFromUserName() {
		return fromUserName;
	}

	public void setFromUserName(String fromUserName) {
		this.fromUserName = fromUserName;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}



	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getPicUrl() {
		return picUrl;
	}

	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}


	public Long getScale() {
		return scale;
	}

	public void setScale(Long scale) {
		this.scale = scale;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getMediaId() {
		return mediaId;
	}

	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}

	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

	public String getRecognition() {
		return recognition;
	}

	public void setRecognition(String recognition) {
		this.recognition = recognition;
	}


	public String getEventKey() {
		return eventKey;
	}

	public void setEventKey(String eventKey) {
		this.eventKey = eventKey;
	}

	public String getTicket() {
		return ticket;
	}

	public void setTicket(String ticket) {
		this.ticket = ticket;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public EMsgType getMsgType() {
		return msgType;
	}

	public void setMsgType(EMsgType msgType) {
		this.msgType = msgType;
	}

	public EEventType getEvent() {
		
		return event;
	}

	public void setEvent(EEventType event) {
		
		this.event = event;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getLocationX() {
		return locationX;
	}

	public void setLocationX(String locationX) {
		this.locationX = locationX;
	}

	public String getLocationY() {
		return locationY;
	}

	public void setLocationY(String locationY) {
		this.locationY = locationY;
	}

    
}  
